.class abstract Les/re0;
.super Ljava/lang/Object;
.source "OBEXServerOperation.java"

# interfaces
.implements Les/up0;
.implements Les/me0;


# instance fields
.field protected a:Les/ue0;

.field protected b:Les/tp0;

.field protected c:Les/le0;

.field protected d:Z

.field protected e:Z

.field protected f:Z

.field protected g:Z

.field protected h:Z

.field protected i:Les/pe0;

.field protected j:Les/oe0;

.field protected k:Z


# direct methods
.method protected constructor <init>(Les/ue0;Les/le0;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Les/re0;->d:Z

    .line 3
    iput-boolean v0, p0, Les/re0;->e:Z

    .line 4
    iput-boolean v0, p0, Les/re0;->f:Z

    .line 5
    iput-boolean v0, p0, Les/re0;->g:Z

    .line 6
    iput-boolean v0, p0, Les/re0;->h:Z

    .line 7
    iput-boolean v0, p0, Les/re0;->k:Z

    .line 8
    iput-object p1, p0, Les/re0;->a:Les/ue0;

    .line 9
    iput-object p2, p0, Les/re0;->b:Les/tp0;

    .line 10
    invoke-virtual {p2}, Les/le0;->e()Z

    move-result p1

    if-eqz p1, :cond_0

    .line 11
    invoke-static {}, Les/ve0;->l()Les/le0;

    move-result-object p1

    iput-object p1, p0, Les/re0;->c:Les/le0;

    .line 12
    iget-object v0, p0, Les/re0;->a:Les/ue0;

    invoke-virtual {v0, p2, p1}, Les/ve0;->a(Les/le0;Les/le0;)V

    :cond_0
    return-void
.end method


# virtual methods
.method a(I)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    int-to-long v0, p1

    const-string v2, "server operation reply final"

    .line 1
    invoke-static {v2, v0, v1}, Les/be0;->b(Ljava/lang/String;J)V

    .line 2
    iget-object v0, p0, Les/re0;->a:Les/ue0;

    iget-object v1, p0, Les/re0;->c:Les/le0;

    invoke-virtual {v0, p1, v1}, Les/ve0;->a(ILes/le0;)V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Les/re0;->c:Les/le0;

    const/16 v1, 0xa0

    if-ne p1, v1, :cond_1

    .line 4
    :cond_0
    :goto_0
    iget-boolean v1, p0, Les/re0;->f:Z

    if-nez v1, :cond_2

    iget-object v1, p0, Les/re0;->a:Les/ue0;

    invoke-virtual {v1}, Les/ue0;->i()Z

    move-result v1

    if-nez v1, :cond_2

    const-string v1, "server waits to receive final packet"

    .line 5
    invoke-static {v1}, Les/be0;->a(Ljava/lang/String;)V

    .line 6
    invoke-virtual {p0}, Les/re0;->i()Z

    .line 7
    iget-boolean v1, p0, Les/re0;->h:Z

    if-nez v1, :cond_0

    .line 8
    iget-object v1, p0, Les/re0;->a:Les/ue0;

    invoke-virtual {v1, p1, v0}, Les/ve0;->a(ILes/le0;)V

    goto :goto_0

    :cond_1
    const-string p1, "sent final reply"

    .line 9
    invoke-static {p1}, Les/be0;->a(Ljava/lang/String;)V

    :cond_2
    return-void
.end method

.method protected a(Les/tp0;Z)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 10
    iget-object v0, p0, Les/re0;->j:Les/oe0;

    if-nez v0, :cond_0

    return-void

    :cond_0
    const/16 v0, 0x48

    .line 11
    invoke-interface {p1, v0}, Les/tp0;->a(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    if-nez v0, :cond_1

    const/16 v0, 0x49

    .line 12
    invoke-interface {p1, v0}, Les/tp0;->a(I)Ljava/lang/Object;

    move-result-object p1

    move-object v0, p1

    check-cast v0, [B

    if-eqz v0, :cond_1

    const/4 p2, 0x1

    :cond_1
    if-eqz v0, :cond_2

    .line 13
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "server received Data eof: "

    invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    const-string v1, " len:"

    invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    array-length v1, v0

    int-to-long v1, v1

    invoke-static {p1, v1, v2}, Les/be0;->a(Ljava/lang/String;J)V

    .line 14
    iget-object p1, p0, Les/re0;->j:Les/oe0;

    invoke-virtual {p1, v0, p2}, Les/oe0;->a([BZ)V

    goto :goto_0

    :cond_2
    if-eqz p2, :cond_3

    .line 15
    iget-object p1, p0, Les/re0;->j:Les/oe0;

    const/4 v0, 0x0

    invoke-virtual {p1, v0, p2}, Les/oe0;->a([BZ)V

    :cond_3
    :goto_0
    return-void
.end method

.method public b()I
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    new-instance v0, Ljava/io/IOException;

    const-string v1, "Operation object was created by an OBEX server"

    invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public b(Les/tp0;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    if-eqz p1, :cond_2

    .line 2
    invoke-static {p1}, Les/le0;->c(Les/tp0;)V

    .line 3
    iget-boolean v0, p0, Les/re0;->d:Z

    if-nez v0, :cond_1

    .line 4
    iget-object v0, p0, Les/re0;->c:Les/le0;

    if-eqz v0, :cond_0

    .line 5
    invoke-static {v0, p1}, Les/le0;->a(Les/tp0;Les/tp0;)Les/tp0;

    goto :goto_0

    .line 6
    :cond_0
    check-cast p1, Les/le0;

    iput-object p1, p0, Les/re0;->c:Les/le0;

    :goto_0
    return-void

    .line 7
    :cond_1
    new-instance p1, Ljava/io/IOException;

    const-string v0, "operation closed"

    invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 8
    :cond_2
    new-instance p1, Ljava/lang/NullPointerException;

    const-string v0, "headers are null"

    invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public close()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Les/re0;->d:Z

    return-void
.end method

.method public e()Ljava/io/DataInputStream;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    new-instance v0, Ljava/io/DataInputStream;

    invoke-interface {p0}, Les/np0;->a()Ljava/io/InputStream;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V

    return-object v0
.end method

.method public f()Les/tp0;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/re0;->b:Les/tp0;

    invoke-static {v0}, Les/le0;->a(Les/tp0;)Les/le0;

    move-result-object v0

    return-object v0
.end method

.method public g()Ljava/io/DataOutputStream;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    new-instance v0, Ljava/io/DataOutputStream;

    invoke-interface {p0}, Les/op0;->h()Ljava/io/OutputStream;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    return-object v0
.end method

.method protected abstract i()Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation
.end method

.method public isClosed()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Les/re0;->d:Z

    return v0
.end method
